<?php // print_r($this->input); ?><hr>
<?php // echo $this->sql; ?>
<h2>Search</h2>
<?php echo $this->searchForm; ?>
<h2>Search result</h2>
<?= count($this->resSearch); ?> found(s)

<?php if (count($this->resSearch)) :?>
	<?php $x = 1; ?>
		<?php foreach ($this->resSearch as $val) :?>
		<div id="search">
		<?php echo $x; ?> 
		<a href="<?= $this->url(array('id' => $val['RecordID']), 'catalog-display')?>">
		<?= $val['Title'] ?> (<?=$val['Year'] ?>)
		</a>
		<? if (!empty($val['Description'])) :?>
		<br /><?= $val['Description'] ?>
		<?php endif; ?>
		<br />
		<strong>
		Grade: 
		<?= $val['Zend_Model_Grade']['GradeName'] ?> |
		Country: 
		<?= $val['Zend_Model_Country']['CountryName'] ?> |
		Sale price: 
		$<?php echo sprintf('%0.2f', $val['SalePriceMin']); ?>
		 to $<?php echo sprintf('%0.2f', $val['SalePriceMin']); ?>
		</strong>
		</div>
		<?php $x++; ?>
		<?php endforeach; ?>
<?php endif; ?>
<hr />
<div id="addItem">
<a href="<?= $this->url(array('module' => 'catalog', 'controller' => 'item', 'action' => 'create'), 
		null, true) ?>">ADD ITEM</a></div>